﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Silverlight.Testing;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using GiveAQuiz.Questions;
using GiveAQuiz.Common;

namespace GiveAQuiz.ClientTests
{
  [TestClass]
  public class EssayQuestionTests
  {
    IQuestionType _question = null;
    const string QUESTION_TEXT = "Is there a real world?";

    [TestInitialize]
    public void Init()
    {
      _question = new EssayQuestionType();
      _question.QuestionText = QUESTION_TEXT;
    }

    [TestCleanup]
    public void Dispose()
    {
      _question = null;
    }

    [TestMethod]
    public void TestEssayQuestionInterface()
    {
      Assert.IsTrue(_question.QuestionText == QUESTION_TEXT, "Question Text not storing correctly.");
      Assert.IsTrue(_question.QuestionData == QUESTION_TEXT, "Question Data not storing correctly.");
    }

    [TestMethod]
    public void TestEssayAnswerInterface()
    {
      Assert.IsTrue(_question.GetResult("Yes there is.") == QuestionResult.Undetermined, "Essay Questions cannot be anything but undetermined.");
    }

  }
}